/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       microphone.cpp
 * Author:     karooolek
 * Created on: 2009-03-24
 *
 **********************************************************************************************************************/

#include "microphone.h"
#include "../system.h"

// well strange, but audio uses the same opengl matrix stack
// until openal has it's own
#include <GL/gl.h>


namespace mGameEngine
{
namespace Audio
{

Microphone::Microphone() :
    _gain(1.0f)
{
}

Microphone::Microphone(float gain) :
    _gain(gain)
{
}

Microphone::~Microphone()
{
}

void Microphone::use() const
{
    alListenerf(AL_GAIN, _gain);
//    there are default openAL values so we dont have to change them
    alListenerfv(AL_POSITION, Vector3(0.0f, 0.0f, 0.001f));
//    alListenerfv(AL_VELOCITY, Vector3(0.0f, 0.0f, 0.0f));
//    float orientation[] = {0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f};
//    alListenerfv(AL_ORIENTATION, orientation);
}

}
}

